package day05_Function;
//比较两个数据是否相等，参数类型分别为
//两个byte类型，两个short类型，两个int类型，两个long类型；
//并在main方法中测试
public class D方法重载练习 {
    public static void main(String[] args) {
        byte a=0;
        byte b=1;
        System.out.println(equals(a,b));
        short a1=1;
        short b1=1;
        System.out.println(equals(a1,b1));
        int a2=3;
        int b2=5;
        System.out.println(equals(a2,b2));
        long a3=2;
        long b3=2;
        System.out.println(equals(a3,b3));
    }
    public static boolean equals(byte a,byte b) {
        System.out.println("byte");
        return a==b;
    }
    public static boolean equals(short a,short b) {
        System.out.println("short");
        return a==b;
    }
    public static boolean equals(int a,int b) {
        System.out.println("int");
        return a==b;
    }
    public static boolean equals(long a,long b) {
        System.out.println("long");
        return a==b;
    }
}
